<template>{{ props.value }}</template>
<script setup lang="ts">
  import { onMounted } from 'vue';

  const emits = defineEmits(['update:value', 'change']);
  const props = defineProps({
    value: {
      type: [String, Number, Array],
    },
    allowClear: {
      type: Boolean,
      default: false,
    },
    formValues: {
      type: Object,
    },
    codeField: {
      type: String,
    },
    disabled: {
      type: Boolean,
      default: false,
    },
    readonly: {
      type: Boolean,
      default: false,
    },
    size: {
      type: String,
      default: 'default',
      validator: (val: string) => {
        return ['default', 'small', 'large'].includes(val);
      },
    },
    placeholder: {
      type: String,
      default: '请输入',
    },
  });
  onMounted(() => {
    emits('update:value', '123');
    emits('change', '123');
  });
</script>
<style lang="less" scoped></style>
